#coding:utf-8
#! ‪C:\Developer\python36\python3.exe
import time

#滚动
def scroll(driver):
    for i in range(1,10):
        time.sleep(1)
        #由于知乎通过滚动加载内容，此处运行js代码，动态加载更多内容
        driver.execute_script("window.scrollTo(0, "+str(i*500)+")")



#阅读全文
def more(driver):
    #找到所有的’阅读全文‘标签，并逐个点击，讲所有的正文完整加载到页面
    moreContent = driver.find_elements_by_class_name('ContentItem-more')
    print(str(len(moreContent))+'-----')
    # try:
    for btn in moreContent:
        btn.click()
        time.sleep(0.1)
    # except:
    #     print('error')







